Implementation of host_metrics.get_all, PIF_metrics.get_all, and docs and
authorEwan Mellor <ewan@xensource.com>
Tue, 27 Feb 2007 01:05:32 +0000 (01:05 +0000)
committerEwan Mellor <ewan@xensource.com>
Tue, 27 Feb 2007 01:05:32 +0000 (01:05 +0000)
bindings for many of the get_all methods elsewhere that Xend already
implemented.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
28 files changed:
docs/xen-api/xenapi-datamodel.tex
tools/libxen/include/xen_console.h
tools/libxen/include/xen_host_cpu.h
tools/libxen/include/xen_host_metrics.h
tools/libxen/include/xen_pbd.h
tools/libxen/include/xen_pif.h
tools/libxen/include/xen_pif_metrics.h
tools/libxen/include/xen_vbd.h
tools/libxen/include/xen_vbd_metrics.h
tools/libxen/include/xen_vdi.h
tools/libxen/include/xen_vif.h
tools/libxen/include/xen_vif_metrics.h
tools/libxen/include/xen_vm_guest_metrics.h
tools/libxen/include/xen_vm_metrics.h
tools/libxen/src/xen_console.c
tools/libxen/src/xen_host_cpu.c
tools/libxen/src/xen_host_metrics.c
tools/libxen/src/xen_pbd.c
tools/libxen/src/xen_pif.c
tools/libxen/src/xen_pif_metrics.c
tools/libxen/src/xen_vbd.c
tools/libxen/src/xen_vbd_metrics.c
tools/libxen/src/xen_vdi.c
tools/libxen/src/xen_vif.c
tools/libxen/src/xen_vif_metrics.c
tools/libxen/src/xen_vm_guest_metrics.c
tools/libxen/src/xen_vm_metrics.c
tools/python/xen/xend/XendAPI.py

index 4c07eaadf0e9ba43c34a7e0cacc895944346bd11..0d85fbdba276055fd80d84c285175e880c3e4994 100644 (file)
@@ -4248,6 +4248,27 @@ $\mathit{RO}_\mathit{run}$ &  {\tt VCPUs/utilisation} & (int $\rightarrow$ float
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: VM\_metrics}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the VM\_metrics instances known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((VM_metrics ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(VM\_metrics ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -4464,6 +4485,27 @@ $\mathit{RO}_\mathit{run}$ &  {\tt other} & (string $\rightarrow$ string) Map &
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: VM\_guest\_metrics}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the VM\_guest\_metrics instances known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((VM_guest_metrics ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(VM\_guest\_metrics ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -6073,6 +6115,27 @@ $\mathit{RO}_\mathit{run}$ &  {\tt memory/free} & int & Host's free memory (byte
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: host\_metrics}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the host\_metrics instances known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((host_metrics ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(host\_metrics ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -6289,6 +6352,27 @@ $\mathit{RO}_\mathit{run}$ &  {\tt utilisation} & float & the current CPU utilis
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: host\_cpu}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the host\_cpus known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((host_cpu ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(host\_cpu ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -7100,6 +7184,27 @@ $\mathit{RO}_\mathit{run}$ &  {\tt metrics} & VIF\_metrics ref & metrics associa
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: VIF}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the VIFs known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((VIF ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(VIF ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -7906,6 +8011,27 @@ $\mathit{RO}_\mathit{run}$ &  {\tt io/write\_kbs} & float & Write bandwidth (KiB
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: VIF\_metrics}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the VIF\_metrics instances known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((VIF_metrics ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(VIF\_metrics ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -8166,6 +8292,27 @@ void
 \noindent{\bf Possible Error Codes:} {\tt PIF\_IS\_PHYSICAL}
 
 \vspace{0.6cm}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the PIFs known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((PIF ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(PIF ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -8642,6 +8789,27 @@ $\mathit{RO}_\mathit{run}$ &  {\tt io/write\_kbs} & float & Write bandwidth (KiB
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: PIF\_metrics}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the PIF\_metrics instances known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((PIF_metrics ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(PIF\_metrics ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -9558,6 +9726,27 @@ void
 
 
 
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the VDIs known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((VDI ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(VDI ref) Set
+}
+
+
+references to all objects
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
@@ -10371,6 +10560,27 @@ void
 
 
 
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the VBDs known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((VBD ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(VBD ref) Set
+}
+
+
+references to all objects
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
@@ -11246,6 +11456,27 @@ $\mathit{RO}_\mathit{run}$ &  {\tt io/write\_kbs} & float & Write bandwidth (KiB
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: VBD\_metrics}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the VBD\_metrics instances known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((VBD_metrics ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(VBD\_metrics ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -11427,6 +11658,27 @@ $\mathit{RO}_\mathit{run}$ &  {\tt currently\_attached} & bool & is the SR curre
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: PBD}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the PBDs known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((PBD ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(PBD ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
@@ -12243,6 +12495,27 @@ $\mathit{RW}$ &  {\tt other\_config} & (string $\rightarrow$ string) Map & addit
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: console}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the consoles known to the system.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((console ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(console ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
index ca4721c49d283527473c4c7aa3d5d17565dbb8ae..5402ae9fbeae717f15f64b8fd1e8b3171a366ae6 100644 (file)
@@ -237,4 +237,11 @@ extern bool
 xen_console_remove_from_other_config(xen_session *session, xen_console console, char *key);
 
 
+/**
+ * Return a list of all the consoles known to the system.
+ */
+extern bool
+xen_console_get_all(xen_session *session, struct xen_console_set **result);
+
+
 #endif
index f70023f24e94e303666f4cee79c472d694f8ef1c..8b6d37f5e39f7b2ce6a713583047bc2ac4a8f5c2 100644 (file)
@@ -229,4 +229,11 @@ extern bool
 xen_host_cpu_get_utilisation(xen_session *session, double *result, xen_host_cpu host_cpu);
 
 
+/**
+ * Return a list of all the host_cpus known to the system.
+ */
+extern bool
+xen_host_cpu_get_all(xen_session *session, struct xen_host_cpu_set **result);
+
+
 #endif
index 6ee609a9e9779e6ede3d5d5a2887675f40517ea1..37a6469e10646022a970b2a85dfa412fe1e9f0d9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -190,4 +190,11 @@ extern bool
 xen_host_metrics_get_memory_free(xen_session *session, int64_t *result, xen_host_metrics host_metrics);
 
 
+/**
+ * Return a list of all the host_metrics instances known to the system.
+ */
+extern bool
+xen_host_metrics_get_all(xen_session *session, struct xen_host_metrics_set **result);
+
+
 #endif
index 6d0f6b449ec53f5118d5dd953ff57d8cf9445dd1..335d20b2ff419ccee7575f78db487f5ee8156c41 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -213,4 +213,11 @@ extern bool
 xen_pbd_get_currently_attached(xen_session *session, bool *result, xen_pbd pbd);
 
 
+/**
+ * Return a list of all the PBDs known to the system.
+ */
+extern bool
+xen_pbd_get_all(xen_session *session, struct xen_pbd_set **result);
+
+
 #endif
index a4d6db742066fb37528960724ea340f196ef81c4..63fc88477b21b9cb6a40e843a3f9b449e36c38fa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -267,4 +267,11 @@ extern bool
 xen_pif_destroy(xen_session *session, xen_pif self);
 
 
+/**
+ * Return a list of all the PIFs known to the system.
+ */
+extern bool
+xen_pif_get_all(xen_session *session, struct xen_pif_set **result);
+
+
 #endif
index 420516d8b6cb30214530644c39d23d2639369a6b..9d49bc8c1d7b97c84b470da5e5028e6e491d1081 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -189,4 +189,11 @@ extern bool
 xen_pif_metrics_get_io_write_kbs(xen_session *session, double *result, xen_pif_metrics pif_metrics);
 
 
+/**
+ * Return a list of all the PIF_metrics instances known to the system.
+ */
+extern bool
+xen_pif_metrics_get_all(xen_session *session, struct xen_pif_metrics_set **result);
+
+
 #endif
index e3cd7e450088db68abc03afd058e518af5d94918..86ad38f207b12b91cee4c0a898c1e4fa161f7289 100644 (file)
@@ -357,4 +357,11 @@ extern bool
 xen_vbd_media_change(xen_session *session, xen_vbd vbd, xen_vdi vdi);
 
 
+/**
+ * Return a list of all the VBDs known to the system.
+ */
+extern bool
+xen_vbd_get_all(xen_session *session, struct xen_vbd_set **result);
+
+
 #endif
index 8b3c1429d4aa8265970cccc2b4606aa7f53b9aab..3cd507b31e7228102e6c004a6985a1dfae5c94ff 100644 (file)
@@ -180,4 +180,11 @@ extern bool
 xen_vbd_metrics_get_io_write_kbs(xen_session *session, double *result, xen_vbd_metrics vbd_metrics);
 
 
+/**
+ * Return a list of all the VBD_metrics instances known to the system.
+ */
+extern bool
+xen_vbd_metrics_get_all(xen_session *session, struct xen_vbd_metrics_set **result);
+
+
 #endif
index 8533df31a8a010d5375490aa82c8702d572a4961..90120370d5815e6fd85b058729e13f7c2b5562a3 100644 (file)
@@ -335,4 +335,11 @@ extern bool
 xen_vdi_resize(xen_session *session, xen_vdi vdi, int64_t size);
 
 
+/**
+ * Return a list of all the VDIs known to the system.
+ */
+extern bool
+xen_vdi_get_all(xen_session *session, struct xen_vdi_set **result);
+
+
 #endif
index 6ef2ebdbea8fc67d7c49cd6a8ad6b574bdfcf2a7..05a070aff4c3dfaf9372edacb1b75e543bd72424 100644 (file)
@@ -331,4 +331,11 @@ extern bool
 xen_vif_remove_from_qos_algorithm_params(xen_session *session, xen_vif vif, char *key);
 
 
+/**
+ * Return a list of all the VIFs known to the system.
+ */
+extern bool
+xen_vif_get_all(xen_session *session, struct xen_vif_set **result);
+
+
 #endif
index 2b150d0a688ef6141edabdd9ffcea98a65a4d417..b5a26f25c6c98689fafb13354e4ef81a9f96f6de 100644 (file)
@@ -180,4 +180,11 @@ extern bool
 xen_vif_metrics_get_io_write_kbs(xen_session *session, double *result, xen_vif_metrics vif_metrics);
 
 
+/**
+ * Return a list of all the VIF_metrics instances known to the system.
+ */
+extern bool
+xen_vif_metrics_get_all(xen_session *session, struct xen_vif_metrics_set **result);
+
+
 #endif
index 61c6c090eaf1f7eacfc3f1f2f2d185235aa843f2..fd328594df3d29406695fe790aee4f626acaf45f 100644 (file)
@@ -224,4 +224,11 @@ extern bool
 xen_vm_guest_metrics_get_other(xen_session *session, xen_string_string_map **result, xen_vm_guest_metrics vm_guest_metrics);
 
 
+/**
+ * Return a list of all the VM_guest_metrics instances known to the system.
+ */
+extern bool
+xen_vm_guest_metrics_get_all(xen_session *session, struct xen_vm_guest_metrics_set **result);
+
+
 #endif
index e3b06c214bad80546331f4ca9ea00fd1e9265d1f..b03c4d4e3c34bb3baea03e8a5da1a6fcc0988083 100644 (file)
@@ -189,4 +189,11 @@ extern bool
 xen_vm_metrics_get_vcpus_utilisation(xen_session *session, xen_int_float_map **result, xen_vm_metrics vm_metrics);
 
 
+/**
+ * Return a list of all the VM_metrics instances known to the system.
+ */
+extern bool
+xen_vm_metrics_get_all(xen_session *session, struct xen_vm_metrics_set **result);
+
+
 #endif
index 0f61fdde6f34aca51ae6fd3b58716f4f7780f92a..a5a5ad2bb223bde6c2d759e99e04db0f395b5a79 100644 (file)
@@ -269,6 +269,18 @@ xen_console_remove_from_other_config(xen_session *session, xen_console console,
 }
 
 
+bool
+xen_console_get_all(xen_session *session, struct xen_console_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "console.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
 bool
 xen_console_get_uuid(xen_session *session, char **result, xen_console console)
 {
index 425d0c60b974dcfd085cdc5920f985211e02c102..1494c10191227b1b05905941356173157c182c66 100644 (file)
@@ -267,6 +267,18 @@ xen_host_cpu_get_utilisation(xen_session *session, double *result, xen_host_cpu
 }
 
 
+bool
+xen_host_cpu_get_all(xen_session *session, struct xen_host_cpu_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "host_cpu.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
 bool
 xen_host_cpu_get_uuid(xen_session *session, char **result, xen_host_cpu host_cpu)
 {
index 910ca229ec733fd421c0def28e135173eec63938..c54270bd2347c3befbfd07c3dd70e2ae2d9960c2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -164,6 +164,18 @@ xen_host_metrics_get_memory_free(xen_session *session, int64_t *result, xen_host
 }
 
 
+bool
+xen_host_metrics_get_all(xen_session *session, struct xen_host_metrics_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "host_metrics.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
 bool
 xen_host_metrics_get_uuid(xen_session *session, char **result, xen_host_metrics host_metrics)
 {
index cb7ac9df72e7a956a577925869cc7e0d760b72dd..1bdcd785fa0fe9f0b424762cfa66ef03be32b359 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -220,6 +220,18 @@ xen_pbd_get_currently_attached(xen_session *session, bool *result, xen_pbd pbd)
 }
 
 
+bool
+xen_pbd_get_all(xen_session *session, struct xen_pbd_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "PBD.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
 bool
 xen_pbd_get_uuid(xen_session *session, char **result, xen_pbd pbd)
 {
index 0e9af6a38202dcc7dde0a38bb52c20d4fa001c00..f710acef4b671ec24398c5e299de11c7edd7a6e9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -351,6 +351,18 @@ xen_pif_destroy(xen_session *session, xen_pif self)
 }
 
 
+bool
+xen_pif_get_all(xen_session *session, struct xen_pif_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "PIF.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
 bool
 xen_pif_get_uuid(xen_session *session, char **result, xen_pif pif)
 {
index 3f09ae7dc1754b4ac4f585c999e686fec5a8c36a..1b30e1293ec5cead29dd955a0e67b99a860fc48e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -164,6 +164,18 @@ xen_pif_metrics_get_io_write_kbs(xen_session *session, double *result, xen_pif_m
 }
 
 
+bool
+xen_pif_metrics_get_all(xen_session *session, struct xen_pif_metrics_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "PIF_metrics.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
 bool
 xen_pif_metrics_get_uuid(xen_session *session, char **result, xen_pif_metrics pif_metrics)
 {
index 4d396b88f7c3c60ae1bb32ab91f4715a9cccbc45..def7403ef9dd0d80d27477360e20c563e0ce8604 100644 (file)
@@ -551,6 +551,18 @@ xen_vbd_media_change(xen_session *session, xen_vbd vbd, xen_vdi vdi)
 }
 
 
+bool
+xen_vbd_get_all(xen_session *session, struct xen_vbd_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "VBD.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
 bool
 xen_vbd_get_uuid(xen_session *session, char **result, xen_vbd vbd)
 {
index f2f51506dfdc4b68f03d8da0b8fe7ab44d36fca5..985553d5a049590be436e526ead44d6644548c37 100644 (file)
@@ -142,6 +142,18 @@ xen_vbd_metrics_get_io_write_kbs(xen_session *session, double *result, xen_vbd_m
 }
 
 
+bool
+xen_vbd_metrics_get_all(xen_session *session, struct xen_vbd_metrics_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "VBD_metrics.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
 bool
 xen_vbd_metrics_get_uuid(xen_session *session, char **result, xen_vbd_metrics vbd_metrics)
 {
index 005425ebc17164c7d9e8b467459ac67d6ae5f870..150d341b1b990a5110cf2713ed1657a9a4e9bb6a 100644 (file)
@@ -506,6 +506,18 @@ xen_vdi_resize(xen_session *session, xen_vdi vdi, int64_t size)
 }
 
 
+bool
+xen_vdi_get_all(xen_session *session, struct xen_vdi_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "VDI.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
 bool
 xen_vdi_get_uuid(xen_session *session, char **result, xen_vdi vdi)
 {
index 74d67ea9d486240c1c2067943e3771029f2f652f..11cba1dcbdc81cab20504de38074de9a9ab6ea10 100644 (file)
@@ -499,6 +499,18 @@ xen_vif_remove_from_qos_algorithm_params(xen_session *session, xen_vif vif, char
 }
 
 
+bool
+xen_vif_get_all(xen_session *session, struct xen_vif_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "VIF.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
 bool
 xen_vif_get_uuid(xen_session *session, char **result, xen_vif vif)
 {
index 1f4399302465a6d2ea553104c708112595292abc..78707b36f5bd1ff8c690f98be2c764c12921d4e7 100644 (file)
@@ -142,6 +142,18 @@ xen_vif_metrics_get_io_write_kbs(xen_session *session, double *result, xen_vif_m
 }
 
 
+bool
+xen_vif_metrics_get_all(xen_session *session, struct xen_vif_metrics_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "VIF_metrics.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
 bool
 xen_vif_metrics_get_uuid(xen_session *session, char **result, xen_vif_metrics vif_metrics)
 {
index 44c9fabe973d01f31f63bd0b3ae49e5bbb36144e..80f4390af96056fabea11b59d96dd052c1fe85ce 100644 (file)
@@ -253,6 +253,18 @@ xen_vm_guest_metrics_get_other(xen_session *session, xen_string_string_map **res
 }
 
 
+bool
+xen_vm_guest_metrics_get_all(xen_session *session, struct xen_vm_guest_metrics_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "VM_guest_metrics.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
 bool
 xen_vm_guest_metrics_get_uuid(xen_session *session, char **result, xen_vm_guest_metrics vm_guest_metrics)
 {
index 6f5e95166e9b9f3b07d26be1ce6a9f1191506a30..9bafa83aa050452fa519bd969e229a765ec2d662 100644 (file)
@@ -164,6 +164,18 @@ xen_vm_metrics_get_vcpus_utilisation(xen_session *session, xen_int_float_map **r
 }
 
 
+bool
+xen_vm_metrics_get_all(xen_session *session, struct xen_vm_metrics_set **result)
+{
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    xen_call_(session, "VM_metrics.get_all", NULL, 0, &result_type, result);
+    return session->ok;
+}
+
+
 bool
 xen_vm_metrics_get_uuid(xen_session *session, char **result, xen_vm_metrics vm_metrics)
 {
index 3562ba45f09394652e2ef57a72e2bd70eeac6b8a..843ac800c68d9b201a948bd0eb8991c3e9de4f9b 100644 (file)
@@ -807,6 +807,9 @@ class XendAPI(object):
     host_metrics_attr_rw = []
     host_metrics_methods = []
 
+    def host_metrics_get_all(self, _):
+        return xen_api_success([XendNode.instance().host_metrics_uuid])
+
     def _host_metrics_get(self, ref, f):
         return xen_api_success(getattr(node, f)())
 
@@ -971,6 +974,9 @@ class XendAPI(object):
     PIF_metrics_attr_rw = []
     PIF_methods = []
 
+    def PIF_metrics_get_all(self, _):
+        return xen_api_success(XendNode.instance().pif_metrics.keys())
+
     def _PIF_metrics_get(self, ref):
         return XendNode.instance().pif_metrics[ref]